setSource

open fun setSource(idx: Int, play: Boolean)

Set the source by index (0 based). Indexes greater than the size of the playlist will wrap.

Parameters

idx

the index of the source in the playlist

play

set false to only set current source and not start playback


open fun setSource(source: Source, play: Boolean)

Sets the current Source.

The source must be part of the current module's playlist.

Parameters

source

The new Source to set as current. It must exist in the current playlist.

play

If true, playback of the source starts immediately. If false, the source is set, but playback is not initiated.


open fun setSource(idx: Int)

Sets and plays the source specified by playlist index (0 based).

Indexes greater than the size of the playlist will wrap.

Parameters

idx

the index of the source in the playlist


open fun setSource(source: Source)

Sets and plays the specified Source in the playlist.

If the specified Source is not found in the playlist, this method does nothing.

Parameters

source

the source to set and play